<template>
   
    <Card dis-hover :style="conheight" class="PtwModelListClass">
        <h3 style="height:35px">
            作业计划详情
        </h3>
        <ButtonGroup slot="extra">
            <Button @click="$router.go(-1)">返回<Icon type="ios-arrow-forward" /></Button>
        </ButtonGroup>
            <Spin style="width:100%;heigth:100%;margin-left:45%;margin-top:200px" size="large" v-if="loadingModel"></Spin>
            <div v-else  style="height:100%;overflow-y:auto;overflow-x:hidden;padding:10px;background-color:grey">
                <Card  v-if="modelData.modelType=='ptw-100001000000001'" shadow>
                    <p slot="title">基础信息</p>
                    <div>
                        <Form  ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                            <Row>
                                <Col span="24">
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="主管部门(申请部门)：" prop="adminDept">
                                                {{ptwData.adminDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                                                {{ptwData.adminDeptExpediter}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业部门/单位：" prop="workDept">
                                                {{ptwData.workDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="属地管理部门：" prop="colonyDept">
                                                {{ptwData.colonyDept}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业类型：" prop="workType">
                                                <RadioGroup disabled v-model="ptwData.workType">
                                                    <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId" :key="item.codingCodeId">{{item.codingName}}</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="汽车吊（t）：" prop="craneQuality">
                                                {{ptwData.craneQuality}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="吊装质量（t）：" prop="hoistingQuality">
                                                {{ptwData.hoistingQuality}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="吊装高度（m）：" prop="hoistingHeight">
                                                {{ptwData.hoistingHeight}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业项目简述：" prop="projectDesc">
                                                {{ptwData.projectDesc}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业等级：" prop="workGrade">
                                                <RadioGroup disabled v-model="ptwData.workGrade" >
                                                    <Radio disabled v-for="(item,index) in workGrades" :label="item.codingCodeId" :key="item.codingCodeId">{{item.codingName}}</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业人员：" prop="workPeople">
                                                {{ptwData.workPeople}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业负责人：" prop="workCharge">
                                                {{ptwData.workCharge}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="司索人员：" prop="cablePeople">
                                                {{ptwData.cablePeople}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="现场监护人：" prop="siteGuarder">
                                                {{ptwData.siteGuarder}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="起重指挥：" prop="craneDirect">
                                                {{ptwData.craneDirect}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="现场指挥：" prop="siteDirect">
                                                {{ptwData.siteDirect}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="起重司机：" prop="craneDriver">
                                                {{ptwData.craneDriver}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="申请作业开始时间：" prop="applyStartDate">
                                                {{formatDate(new Date(ptwData.applyStartDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="申请作业结束时间：" prop="applyEndDate">
                                                {{formatDate(new Date(ptwData.applyEndDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
                <Card  v-if="modelData.modelType=='ptw-100001000000002'" shadow>
                    <p slot="title">基础信息</p>
                    <div>
                        <Form  ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                            <Row>
                                <Col span="24">
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="主管部门(申请部门)：" prop="adminDept">
                                                {{ptwData.adminDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                                                {{ptwData.adminDeptExpediter}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业部门/单位：" prop="workDept">
                                                {{ptwData.workDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="属地管理部门：" prop="colonyDept">
                                                {{ptwData.colonyDept}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业项目简述：" prop="projectDesc">
                                                {{ptwData.projectDesc}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业类型：" prop="workType">
                                                <RadioGroup disabled v-model="ptwData.workType">
                                                    <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId" :key="item.codingCodeId">{{item.codingName}}</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业人员：" prop="workPeople">
                                                {{ptwData.workPeople}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业负责人：" prop="workCharge">
                                                {{ptwData.workCharge}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="现场监护人：" prop="siteGuarder">
                                                {{ptwData.siteGuarder}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="申请作业开始时间：" prop="applyStartDate">
                                                {{formatDate(new Date(ptwData.applyStartDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="申请作业结束时间：" prop="applyEndDate">
                                                {{formatDate(new Date(ptwData.applyEndDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000006' || modelData.modelType=='ptw-100001000000007'  "> <!--清库清仓作业许可--> 
                    <p slot="title">基础信息</p>
                    <div>
                        <Form  ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                            <Row>
                                <Col span="24">
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="23">
                                            <FormItem label="主管部门(申请部门)：" prop="adminDept">
                                                {{ptwData.adminDept}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="23">
                                            <FormItem label="作业项目简述：" prop="projectDesc">
                                                {{ptwData.projectDesc}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业类型：" prop="workType">
                                                <RadioGroup disabled v-model="ptwData.workType">
                                                    <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId" :key="item.codingCodeId">{{item.codingName}}</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业负责人：" prop="workCharge">
                                                {{ptwData.workCharge}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业人员：" prop="workPeople">
                                                {{ptwData.workPeople}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="现场监护人：" prop="siteGuarder">
                                                {{ptwData.siteGuarder}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyStartDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                            <Col span="11">
                                            <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyEndDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>  
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000003'"> <!--有限空间--> 
                    <p slot="title">基础信息</p>
                    <div>
                        <Form  ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                            <Row>
                                <Col span="24">
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="主管部门(申请部门)：" prop="adminDept">
                                                {{ptwData.adminDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                                                {{ptwData.adminDeptExpediter}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业部门/单位：" prop="workDept">
                                                {{ptwData.workDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="属地管理部门：" prop="colonyDept">
                                                {{ptwData.colonyDept}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="23">
                                            <FormItem label="作业项目简述：" prop="projectDesc">
                                                {{ptwData.projectDesc}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业类型：" prop="workType">
                                                <RadioGroup disabled v-model="ptwData.workType">
                                                    <Radio v-for="(item,index) in workTypes" :label="item.codingCodeId" :key="item.codingCodeId">{{item.codingName}}</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业等级：" prop="workGrade">
                                                <RadioGroup disabled v-model="ptwData.workGrade">
                                                    <Radio disabled v-for="(item,index) in confinedSpaceWorkGrades" :label="item.codingCodeId" :key="item.codingCodeId">{{item.codingName}}</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业人员：" prop="workPeople">
                                                {{ptwData.workPeople}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="现场监护人：" prop="siteGuarder">
                                                {{ptwData.siteGuarder}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业负责人：" prop="workCharge">
                                                {{ptwData.workCharge}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyStartDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                            <Col span="11">
                                            <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyEndDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
                    <Card  shadow v-if="modelData.modelType=='ptw-100001000000004'"> <!--高处作业许可--> 
                    <p slot="title">基础信息</p>
                    <div>
                        <Form  ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                            <Row>
                                <Col span="24">
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="主管部门(申请部门)：" prop="adminDept">
                                                {{ptwData.adminDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                                                {{ptwData.adminDeptExpediter}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业部门/单位：" prop="workDept">
                                                {{ptwData.workDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="属地管理部门：" prop="colonyDept">
                                                {{ptwData.colonyDept}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="23">
                                            <FormItem label="作业项目简述：" prop="projectDesc">
                                                {{ptwData.projectDesc}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="基准面（m）：" prop="datumGrade">
                                                {{ptwData.datumGrade}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业等级：" prop="workGrade">
                                                <RadioGroup disabled v-model="ptwData.workGrade">
                                                    <Radio disabled v-for="(item,index) in highWorkGrades" :label="item.codingCodeId" :key="item.codingCodeId">{{item.codingName}}</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业类型：" prop="workType">
                                                <RadioGroup disabled v-model="ptwData.workType">
                                                    <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId" :key="item.codingCodeId">{{item.codingName}}</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业人员及证号：" prop="workPeople">
                                                {{ptwData.workPeople}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业负责人：" prop="workCharge">
                                                {{ptwData.workCharge}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="现场监护人：" prop="siteGuarder">
                                                {{ptwData.siteGuarder}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyStartDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                            <Col span="11">
                                            <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyEndDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000005'"> <!--动火作业许可--> 
                    <p slot="title">基础信息</p>
                    <div>
                        <Form  ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                            <Row>
                                <Col span="24">
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="主管部门(申请部门)：" prop="adminDept">
                                                {{ptwData.adminDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                                                {{ptwData.adminDeptExpediter}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业部门/单位：" prop="workDept">
                                                {{ptwData.workDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="属地管理部门：" prop="colonyDept">
                                                {{ptwData.colonyDept}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="23">
                                            <FormItem label="作业项目简述：" prop="projectDesc">
                                                {{ptwData.projectDesc}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业类型：" prop="workType">
                                                <RadioGroup disabled v-model="ptwData.workType">
                                                    <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId" :key="item.codingCodeId">{{item.codingName}}</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业等级：" prop="workGrade">
                                                <RadioGroup disabled v-model="ptwData.workGrade">
                                                    <Radio disabled label="ptw-100003000000001" >特殊动火</Radio>
                                                    <Radio disabled label="ptw-100003000000002" >一级动火</Radio>
                                                    <Radio disabled label="ptw-100003000000003" >二级动火</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业负责人：" prop="workCharge">
                                                {{ptwData.workCharge}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="现场监护人：" prop="siteGuarder">
                                                {{ptwData.siteGuarder}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业人员及证号：" prop="workPeople">
                                                {{ptwData.workPeople}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyStartDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                            <Col span="11">
                                            <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyEndDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000008'"> <!--临时用电作业许可--> 
                    <p slot="title">基础信息</p>
                    <div>
                        <Form  ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                            <Row>
                                <Col span="24">
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="主管部门(申请部门)：" prop="adminDept">
                                                {{ptwData.adminDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                                                {{ptwData.adminDeptExpediter}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业部门/单位：" prop="workDept">
                                                {{ptwData.workDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="属地管理部门：" prop="colonyDept">
                                                {{ptwData.colonyDept}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="申请用电地点：" prop="applyUseElectricSite">
                                                {{ptwData.applyUseElectricSite}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="用电功率：" prop="useElectricPower">
                                                {{ptwData.useElectricPower}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业类型：" prop="workType">
                                                <RadioGroup disabled v-model="ptwData.workType">
                                                    <Radio v-for="(item,index) in workTypes" :label="item.codingCodeId" :key="item.codingCodeId">{{item.codingName}}</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="申请供电制式：" prop="electricStandard">
                                                <RadioGroup disabled v-model="ptwData.electricStandard">
                                                    <Radio disabled label="1">单相</Radio>
                                                    <Radio disabled label="2">三相四线</Radio>
                                                    <Radio disabled label="3">三相五线</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="电源接入点：" prop="electricAccessPoint">
                                                {{ptwData.electricAccessPoint}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="计划用电天数：" prop="applyUseElectricDay">
                                                {{ptwData.applyUseElectricDay}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="操作类型：" prop="electricType">
                                                <RadioGroup disabled v-model="ptwData.electricType">
                                                    <Radio disabled label="1">安装</Radio>
                                                    <Radio disabled label="2">拆除</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="操作时间：" prop="electricWorkTime">
                                                {{formatDate(new Date(ptwData.electricWorkTime),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="验收时间：" prop="electricCheckTime">
                                                {{formatDate(new Date(ptwData.electricCheckTime),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="申请用电开始时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyStartDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                            <Col span="11">
                                            <FormItem label="申请用电结束时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyEndDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="电工签名：" prop="eleWorkerName">
                                                <div v-for="fileItem in signFileList" :key='fileItem.id'>
                                                    <div v-if="fileItem.fileName.indexOf('eleWorkerNameSign')!=-1">
                                                        <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                                            <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                                        </router-link>
                                                    </div>
                                                </div>
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="验收人签名：" prop="eleCheckerName">
                                                <div v-for="fileItem in signFileList" :key='fileItem.id'>
                                                    <div v-if="fileItem.fileName.indexOf('eleCheckerNameSign')!=-1">
                                                        <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                                            <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                                        </router-link>
                                                    </div>
                                                </div>
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000009'"> <!--高温作业许可--> 
                    <p slot="title">基础信息</p>
                    <div>
                        <Form  ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                            <Row>
                                <Col span="24">
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="主管部门(申请部门)：" prop="adminDept">
                                                {{ptwData.adminDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                                                {{ptwData.adminDeptExpediter}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业部门/单位：" prop="workDept">
                                                {{ptwData.workDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="属地管理部门：" prop="colonyDept">
                                                {{ptwData.colonyDept}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业类型：" prop="workType">
                                                <RadioGroup disabled v-model="ptwData.workType">
                                                    <Radio v-for="(item,index) in workTypes" :label="item.codingCodeId" :key="item.codingCodeId">{{item.codingName}}</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业等级：" prop="workGrade">
                                                <RadioGroup disabled v-model="ptwData.workGrade">
                                                    <Radio disabled label="item.codingCodeId" :key="item.codingCodeId">{{item.codingName}}</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业项目简述：" prop="projectDesc">
                                                {{ptwData.projectDesc}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业人员及证号：" prop="workPeople">
                                                {{ptwData.workPeople}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业负责人：" prop="workCharge">
                                                {{ptwData.workCharge}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="现场监护人：" prop="siteGuarder">
                                                {{ptwData.siteGuarder}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyStartDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                            <Col span="11">
                                            <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyEndDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000010'"> <!--交叉作业许可--> 
                    <p slot="title">基础信息</p>
                    <div>
                        <Form  ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                            <Row>
                                <Col span="24">
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="主管部门(申请部门)：" prop="adminDept">
                                                {{ptwData.adminDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                                                {{ptwData.adminDeptExpediter}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业部门/单位：" prop="workDept">
                                                {{ptwData.workDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="属地管理部门：" prop="colonyDept">
                                                {{ptwData.colonyDept}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业项目简述：" prop="projectDesc">
                                                {{ptwData.projectDesc}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业类型：" prop="workType">
                                                <RadioGroup disabled v-model="ptwData.workType">
                                                    <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId" :key="item.codingCodeId">{{item.codingName}}</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyStartDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                            <Col span="11">
                                            <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyEndDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000011'"> <!--动土作业许可--> 
                    <p slot="title">基础信息</p>
                    <div>
                        <Form  ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                            <Row>
                                <Col span="24">
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="主管部门(申请部门)：" prop="adminDept">
                                                {{ptwData.adminDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                                                {{ptwData.adminDeptExpediter}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业部门/单位：" prop="workDept">
                                                {{ptwData.workDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="属地管理部门：" prop="colonyDept">
                                                {{ptwData.colonyDept}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业内容：" prop="projectDesc">
                                                {{ptwData.projectDesc}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业类型：" prop="workGrade">
                                                <RadioGroup disabled v-model="ptwData.workGrade">
                                                    <Radio disabled v-for="(item,index) in soilWorkGrades" :label="item.codingCodeId" :key="item.codingCodeId">{{item.codingName}}</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyStartDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                            <Col span="11">
                                            <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyEndDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>  
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000010'"> <!--交叉--> 
                    <p slot="title">相关方列表</p>
                    <div>
                        <Row type="flex" justify="space-around" class="code-row-bg">
                            <Col span="23">
                                <Table class="tableClass" highlight-row stripe border
                                        style="overflow-y:auto;"
                                        :height="200" :columns="relatedPartyColumn" :data="relatedPartyDatas">
                                </Table>
                            </Col>
                        </Row>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000020' || modelData.modelType=='ptw-100001000000021'">  <!-- 爆破作业，盲炮处理-->
                    <p slot="title">基础信息</p>
                    <div>
                        <Form  ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="160" label-position="right">
                            <Row>
                                <Col span="24">
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="主管部门(申请部门)：" prop="adminDept">
                                                {{ptwData.adminDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                                                {{ptwData.adminDeptExpediter}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业部门/单位：" prop="workDept">
                                                {{ptwData.workDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="属地管理部门：" prop="colonyDept">
                                                {{ptwData.colonyDept}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业类型：" prop="workType">
                                                <RadioGroup disabled v-model="ptwData.workType">
                                                    <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId" :key="item.codingCodeId">{{item.codingName}}</Radio>
                                                </RadioGroup>
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业项目简述：" prop="projectDesc">
                                                {{ptwData.projectDesc}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业负责人：" prop="workCharge">
                                                {{ptwData.workCharge}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="现场监护人：" prop="siteGuarder">
                                                {{ptwData.siteGuarder}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyStartDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyEndDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000022'">  <!-- 大型铸件合浇作业-->
                    <p slot="title">基础信息</p>
                    <div>
                        <Form  ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="160" label-position="right">
                            <Row>
                                <Col span="24">
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="主管部门(申请部门)：" prop="adminDept">
                                                {{ptwData.adminDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                                                {{ptwData.adminDeptExpediter}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业部门/单位：" prop="workDept">
                                                {{ptwData.workDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="属地管理部门：" prop="colonyDept">
                                                {{ptwData.colonyDept}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="23">
                                            <FormItem label="作业项目简述：" prop="projectDesc">
                                                {{ptwData.projectDesc}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业人员：" prop="workPeople">
                                                {{ptwData.workPeople}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业负责人：" prop="workCharge">
                                                {{ptwData.workCharge}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="现场监护人：" prop="siteGuarder">
                                                {{ptwData.siteGuarder}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyStartDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyEndDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000025'">  <!-- 断路作业-->
                    <p slot="title">基础信息</p>
                    <div>
                        <Form  ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="160" label-position="right">
                            <Row>
                                <Col span="24">
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="申请单位：" prop="adminDept">
                                                {{ptwData.adminDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="申请人：" prop="adminDeptExpediter">
                                                {{ptwData.adminDeptExpediter}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业单位：" prop="workDept">
                                                {{ptwData.workDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业编号：" prop="workPeople">
                                                {{ptwData.workPeople}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="23">
                                            <FormItem label="涉及相关单位（部门）：" prop="colonyDept">
                                                {{ptwData.colonyDept}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="23">
                                            <FormItem label="断路原因：" prop="brokenReason">
                                                {{ptwData.brokenReason}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="断路开始时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyStartDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="断路结束时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyEndDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="23">
                                            <FormItem label="断路地段示意图及相关说明：" prop="brokenExplain">
                                                {{ptwData.brokenExplain}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="23">
                                            <FormItem label="附件：" prop="file">
                                                <div v-for="fileItem in signFileList" :key='fileItem.id'>
                                                    <div v-if="fileItem.fileName.indexOf('file')!=-1">
                                                        <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                                            <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                                        </router-link>
                                                    </div>
                                                </div>
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="23">
                                            <FormItem label="危害辨识：" prop="hazardIdentification">
                                                {{ptwData.hazardIdentification}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000024' || modelData.modelType=='ptw-100001000000023'">  <!-- 清结皮作业-->
                    <p slot="title">基础信息</p>
                    <div>
                        <Form  ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="160" label-position="right">
                            <Row>
                                <Col span="24">
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="管理单位：" prop="adminDept">
                                                {{ptwData.adminDept}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业单位：" prop="workDept">
                                                {{ptwData.workDept}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业地点：" prop="workSite">
                                                {{ptwData.workSite}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="作业高度："  v-if="modelData.modelType=='ptw-100001000000024'"  prop="workHeight">
                                                {{ptwData.workHeight}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="23">
                                            <FormItem label="作业内容：" prop="projectDesc">
                                                {{ptwData.projectDesc}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="作业人：" prop="workPeople">
                                                {{ptwData.workPeople}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="监护人：" prop="siteGuarder">
                                                {{ptwData.siteGuarder}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row type="flex" justify="space-around" class="code-row-bg">
                                        <Col span="11">
                                            <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyStartDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                        <Col span="11">
                                            <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                                                {{formatDate(new Date(ptwData.applyEndDate),'yyyy-MM-dd hh:mm')}}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000023' || modelData.modelType=='ptw-100001000000024'">
                    <p slot="title">特种作业人员列表</p>
                    <div>
                        <Row type="flex" justify="space-around" class="code-row-bg">
                            <Col span="23">
                                <Table class="tableClass" highlight-row stripe border
                                       style="overflow-y:auto;"
                                       :height="200" :columns="viewPtwWorkerColumn" :data="ptwWorkerDatas">
                                </Table>
                            </Col>
                        </Row>
                    </div>
                </Card>
                <Card bordered dis-hover :key="item.modelSubId" v-for="(item,index) in workItems"  shadow>
                    <p slot="title">
                        {{item.parentModelSubName!=null?item.parentModelSubName+"-":""}}{{item.modelSubName}}：{{item.modelSubDesc}}
                    </p>
                    <div  class="modelSub" v-if="item.modelSubName.indexOf('控制措施')!=-1">
                        <Row :class="rowIndex%2==0?detailRow1:detailRow2" v-for="(row,rowIndex) in item.rows" :key="row.itemId">
                            <Col span="6" v-for="child in row" :key="child.itemId"  style="padding-left: 10px;border-right: 1px solid #E0E0EC;" >
                                <span v-if="child.itemId!=undefined && child.dataType=='3'" style="color:red">*</span>
                                <span v-if="child.itemId!=undefined && child.dataType!='2'">{{child.itemName}}<br>
                                    <RadioGroup disbaled v-model="child.instanceContent">
                                        <Radio disabled label="1" >是</Radio>
                                        <Radio disabled label="0">否</Radio>
                                    </RadioGroup>
                                </span>
                                <span v-if="child.itemId!=undefined && child.dataType=='2'">{{child.itemName}}<br>
                                    <Poptip trigger="hover" title="" placement="bottom-start">
                                        <div slot="content">
                                            <p style="white-space: normal">{{child.instanceContent}}</p>
                                        </div>
                                        <input type="text" readonly style="height: 35px" v-model="child.instanceContent" @change="getChildPosition(index,child.itemId,child.instanceContent)"></input>
                                    </Poptip>
                                </span>
                                <div>
                                    <div v-for="fileItem in imgs" :key='fileItem.id' v-if="fileItem.field == child.itemId">
                                    <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                        <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                    </router-link>
                                    <a @click="downloadFiles(fileItem)"><span
                                        style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                                    </a>
                                    </div>
                                </div>             
                            </Col>
                        </Row>
                    </div>
                    <div  class="modelSub" v-if="item.modelSubName.indexOf('风险分析')!=-1">
                        <Row :class="rowIndex%2==0?detailRow1:detailRow2" v-for="(row,rowIndex) in item.rows" :key="row.itemId">
                            <Col span="6" v-for="child in row" :key="child.itemId"  style="padding-left: 10px;border-right: 1px solid #E0E0EC;" >
                                <span v-if="child.itemId!=undefined && child.dataType=='3'" style="float:left;color:red">*</span>
                                <CheckboxGroup  disabled  v-model="child.instanceContent" v-if="child.itemId!=undefined && child.dataType!='2'">
                                    <Checkbox disabled label="1">
                                        <span>{{child.itemName}}</span>
                                    </Checkbox>
                                </CheckboxGroup>
                                <span v-if="child.itemId!=undefined && child.dataType=='2'">{{child.itemName}}<br>
                                    <Poptip trigger="hover" title="" placement="bottom-start">
                                        <div slot="content">
                                            <p style="white-space: normal">{{child.instanceContent}}</p>
                                        </div>
                                        <input type="text" readonly style="height: 35px" v-model="child.instanceContent" @change="getChildPosition(index,child.itemId,child.instanceContent)"></input>
                                    </Poptip>
                                </span>    
                            </Col>
                        </Row>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType!=undefined&&modelData.modelType!=''
                             &&modelData.modelType!='ptw-100001000000020'&&modelData.modelType!='ptw-100001000000021'
                             &&modelData.modelType!='ptw-100001000000023'
                            &&modelData.modelType!='ptw-100001000000024'&&modelData.modelType!='ptw-100001000000025'">
                    <p slot="title">现场确认</p>
                    <div>
                        <Form  :rules="ptwRuleCustom" :label-width="180" label-position="right">
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <p>本人已清楚本次作业的风险和控制措施，将严格遵守相关要求并确认所有安全措施已落实到位。</p>
                                </Col>
                            </Row>
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <FormItem label="作业人员确认签字：" prop="workPeopleSign">
                                        <div v-for="fileItem in signFileList" :key='fileItem.id'>
                                            <div v-if="fileItem.fileName.indexOf('workPeopleSign')!=-1">
                                                <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                                    <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                                </router-link>
                                            </div>
                                        </div>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <FormItem label="监护人确认签字：" prop="siteGuarderSign">
                                        <div v-for="fileItem in signFileList" :key='fileItem.id'>
                                            <div v-if="fileItem.fileName.indexOf('siteGuarderSign')!=-1">
                                                <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                                    <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                                </router-link>
                                            </div>
                                        </div>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <FormItem label="作业负责人确认签字：" prop="workChargeSign">
                                        <div v-for="fileItem in signFileList" :key='fileItem.id'>
                                            <div v-if="fileItem.fileName.indexOf('workChargeSign')!=-1">
                                                <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                                    <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                                </router-link>
                                            </div>
                                        </div>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <FormItem label="附件：" prop="workPeopleSign">
                                        <div v-for="fileItem in signPhotoFileList" :key='fileItem.id'>
                                           <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                                <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                            </router-link>
                                        </div>
                                    </FormItem>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000025'">
                    <p slot="title">现场确认</p>
                    <div>
                        <Form  :rules="ptwRuleCustom" :label-width="180" label-position="right">
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <p>本人已清楚本次作业的风险和控制措施，将严格遵守相关要求并确认所有安全措施已落实到位。</p>
                                </Col>
                            </Row>
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <FormItem label="实施安全教育人：" prop="workPeopleSign">
                                        <div v-for="fileItem in signFileList" :key='fileItem.id'>
                                            <div v-if="fileItem.fileName.indexOf('workPeopleSign')!=-1">
                                                <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                                    <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                                </router-link>
                                            </div>
                                        </div>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <FormItem label="附件：" prop="workPeopleSign">
                                        <div v-for="fileItem in signPhotoFileList" :key='fileItem.id'>
                                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                                <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                            </router-link>
                                        </div>
                                    </FormItem>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000020' || modelData.modelType=='ptw-100001000000021'">
                    <p slot="title">现场确认</p>
                    <div>
                        <Form  :rules="ptwRuleCustom" :label-width="180" label-position="right">
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <FormItem label="爆破班组长签字：" prop="chargePeopleSign">
                                        <div v-for="fileItem in signFileList" :key='fileItem.id'>
                                            <div v-if="fileItem.fileName.indexOf('chargePeopleSign')!=-1">
                                                <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                                    <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                                </router-link>
                                            </div>
                                        </div>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <FormItem label="爆破安全员签字：" prop="securityGuardSign">
                                        <div v-for="fileItem in signFileList" :key='fileItem.id'>
                                            <div v-if="fileItem.fileName.indexOf('securityGuardSign')!=-1">
                                                <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                                    <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                                </router-link>
                                            </div>
                                        </div>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <FormItem label="爆破技术员签字：" prop="technicianSign">
                                        <div v-for="fileItem in signFileList" :key='fileItem.id'>
                                            <div v-if="fileItem.fileName.indexOf('technicianSign')!=-1">
                                                <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                                    <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                                </router-link>
                                            </div>
                                        </div>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <FormItem label="作业负责人确认签字：" prop="workChargeSign">
                                        <div v-for="fileItem in signFileList" :key='fileItem.id'>
                                            <div v-if="fileItem.fileName.indexOf('workChargeSign')!=-1">
                                                <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                                    <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                                </router-link>
                                            </div>
                                        </div>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <FormItem label="附件：" prop="workPeopleSign">
                                        <div v-for="fileItem in signPhotoFileList" :key='fileItem.id'>
                                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                                <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                            </router-link>
                                        </div>
                                    </FormItem>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000005'"> <!--动火--> 
                    <p slot="title">气体浓度检测分析记录</p>
                    <div>
                        <Row type="flex" justify="space-around" class="code-row-bg">
                            <Col span="23">
                                <Table class="tableClass" highlight-row stripe border
                                        style="overflow-y:auto;"
                                        :height="200" :columns="donghuoGasColumn" :data="beforeGasDatas">
                                    <template slot-scope="{ row, index }" slot="checkResult">
                                        <RadioGroup v-model="beforeGasDatas[index].checkResult">
                                            <Radio disabled label="1">符合</Radio>
                                            <Radio disabled label="2">不符合</Radio>
                                        </RadioGroup>
                                    </template>
                                    <template slot-scope="{ row,index }" slot="checkUserSign">
                                        <div style="display:flex;flex-direction:column;justify-content:center"  @click="currentGasDataIndex = index">
                                            <div style="display:flex;flex-direction:column;justify-content:center"  
                                                v-if="beforeGasDatas[index].file != null && beforeGasDatas[index].file != undefined">
                                                <router-link target="_blank" :to="{path:'/imgDetails',query:{id: beforeGasDatas[index].file.id}}">
                                                    <img :src=" beforeGasDatas[index].file.allPath" alt="" style="width: 50px;height: 50px;">
                                                </router-link>
                                                <a @click="downloadFiles( beforeGasDatas[index].file)"><span
                                                    style="color: #3399ff;margin-left: 5px"> {{  beforeGasDatas[index].file.fileName }}</span>
                                                </a>
                                            </div>
                                        </div>
                                    </template>
                                </Table>
                            </Col>
                        </Row>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000007'"> <!--篦冷机清大块--> 
                    <p slot="title">气体浓度检测分析记录</p>
                    <div>
                        <Row type="flex" justify="space-around" class="code-row-bg">
                            <Col span="23">
                                <Button style="margin-top:20px" class="ivu-btn-add" icon="md-add" @click="addGas()">新增</Button>
                            </Col>
                        </Row>
                        <Row type="flex" justify="space-around" class="code-row-bg">
                            <Col span="23">
                                <Table class="tableClass" highlight-row stripe border
                                        style="overflow-y:auto;"
                                        :height="200" :columns="lengjiGasColumn" :data="beforeGasDatas">
                                    <template slot-scope="{ row, index }" slot="checkResult">
                                        <RadioGroup v-model="beforeGasDatas[index].checkResult">
                                            <Radio disbaled label="1">符合</Radio>
                                            <Radio disabled label="2">不符合</Radio>
                                        </RadioGroup>
                                    </template>
                                    <template slot-scope="{ row,index }" slot="checkUserSign">
                                        <div style="display:flex;flex-direction:column;justify-content:center"  @click="currentGasDataIndex = index">
                                            <div style="display:flex;flex-direction:column;justify-content:center"  
                                                v-if="beforeGasDatas[index].file != null && beforeGasDatas[index].file != undefined">
                                                <router-link target="_blank" :to="{path:'/imgDetails',query:{id: beforeGasDatas[index].file.id}}">
                                                    <img :src=" beforeGasDatas[index].file.allPath" alt="" style="width: 50px;height: 50px;">
                                                </router-link>
                                                <a @click="downloadFiles( beforeGasDatas[index].file)"><span
                                                    style="color: #3399ff;margin-left: 5px"> {{  beforeGasDatas[index].file.fileName }}</span>
                                                </a>
                                            </div>
                                        </div>
                                    </template>
                                </Table> 
                            </Col>
                        </Row>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000002' || modelData.modelType=='ptw-100001000000003'"> <!--有限空间--> 
                    <p slot="title">气体浓度检测分析记录</p>
                    <div>
                        <Row type="flex" justify="space-around" class="code-row-bg">
                            <Col span="23">
                                <Table class="tableClass" highlight-row stripe border
                                        style="overflow-y:auto;"
                                        :height="200" :columns="youxianGasColumn" :data="beforeGasDatas">
                                    <template slot-scope="{ row, index }" slot="checkResult">
                                        <RadioGroup v-model="beforeGasDatas[index].checkResult">
                                            <Radio disabled label="1">符合</Radio>
                                            <Radio disabled label="2">不符合</Radio>
                                        </RadioGroup>
                                    </template>
                                    <template slot-scope="{ row,index }" slot="checkUserSign">
                                        <div style="display:flex;flex-direction:column;justify-content:center"  @click="currentGasDataIndex = index">
                                            <div style="display:flex;flex-direction:column;justify-content:center"  
                                                v-if="beforeGasDatas[index].file != null && beforeGasDatas[index].file != undefined">
                                                <router-link target="_blank" :to="{path:'/imgDetails',query:{id: beforeGasDatas[index].file.id}}">
                                                    <img :src=" beforeGasDatas[index].file.allPath" alt="" style="width: 50px;height: 50px;">
                                                </router-link>
                                                <a @click="downloadFiles( beforeGasDatas[index].file)"><span
                                                    style="color: #3399ff;margin-left: 5px"> {{  beforeGasDatas[index].file.fileName }}</span>
                                                </a>
                                            </div>
                                        </div>
                                    </template>
                                </Table>
                            </Col>
                        </Row>
                    </div>
                </Card>
                <Card  v-if="modelData.modelType!=undefined&&modelData.modelType!=''" shadow>
                    <p slot="title">现场应急处置</p>
                    <div>
                        <Form  ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <p>{{modelData.notes}}</p>
                                </Col>
                            </Row>
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="11">
                                    <FormItem label="逃生路径：" prop="escapePath">
                                        {{ptwData.escapePath}}
                                    </FormItem>
                                </Col>
                                <Col span="11">
                                    <FormItem label="其他应急处置：" prop="emergencyHandling">
                                        {{ptwData.emergencyHandling}}
                                    </FormItem>
                                </Col>
                            </Row>
							<!-- 混凝土 -->
							<div v-if="this.twoLevelOrgId=='18000050'"> 
								<Row type="flex" justify="space-around" class="code-row-bg">
								    <Col span="11">
								        <FormItem label="站点业务主管部门负责人：" prop="belongOrgOfficerName">
								            <router-link v-if="belongOrgOfficer.allPath!=undefined" target="_blank" :to="{path:'/imgDetails',query:{id:belongOrgOfficer.id}}">
								                <img :src="belongOrgOfficer.allPath" alt="" style="width: 50px;height: 50px;">
								            </router-link>
								        </FormItem>
								    </Col>
								    <Col span="11">
								        <FormItem label="站点安全环保专员：" prop="belongOrgLeaderName">
								            <router-link v-if="belongOrgLeader.allPath!=undefined" target="_blank" :to="{path:'/imgDetails',query:{id:belongOrgLeader.id}}">
								                <img :src="belongOrgLeader.allPath" alt="" style="width: 50px;height: 50px;">
								            </router-link>
								        </FormItem>
								    </Col>
								</Row>
								<Row type="flex" justify="space-around" class="code-row-bg">
								    <Col span="11">
								        <FormItem label="站点安全分管经理：" prop="bussinessDeptName">
								            <router-link v-if="bussinessDept.allPath!=undefined" target="_blank" :to="{path:'/imgDetails',query:{id:bussinessDept.id}}">
								                <img :src="bussinessDept.allPath" alt="" style="width: 50px;height: 50px;">
								            </router-link>
								        </FormItem>
								    </Col>
								    <Col span="11">
								        <FormItem label="站点经理：" prop="securityDept">
								            <router-link v-if="securityDept.allPath!=undefined" target="_blank" :to="{path:'/imgDetails',query:{id:securityDept.id}}">
								                <img :src="securityDept.allPath" alt="" style="width: 50px;height: 50px;">
								            </router-link>
								        </FormItem>
								    </Col>
								</Row>
							</div>
							<div v-else>
								<Row type="flex" justify="space-around" class="code-row-bg">
									<Col span="11">
										<FormItem label="属地部门安全员：" prop="belongOrgOfficerName">
											<router-link v-if="belongOrgOfficer.allPath!=undefined" target="_blank" :to="{path:'/imgDetails',query:{id:belongOrgOfficer.id}}">
												<img :src="belongOrgOfficer.allPath" alt="" style="width: 50px;height: 50px;">
											</router-link>
										</FormItem>
									</Col>
									<Col span="11">
										<FormItem label="属地部门值班调度：" prop="belongOrgLeaderName">
											<router-link v-if="belongOrgLeader.allPath!=undefined" target="_blank" :to="{path:'/imgDetails',query:{id:belongOrgLeader.id}}">
												<img :src="belongOrgLeader.allPath" alt="" style="width: 50px;height: 50px;">
											</router-link>
										</FormItem>
									</Col>
								</Row>
								<Row type="flex" justify="space-around" class="code-row-bg">
									<Col span="11">
										<FormItem label="业务主管部门：" prop="bussinessDeptName">
											<router-link v-if="bussinessDept.allPath!=undefined" target="_blank" :to="{path:'/imgDetails',query:{id:belongOrgOfficer.id}}">
												<img :src="bussinessDept.allPath" alt="" style="width: 50px;height: 50px;">
											</router-link>
										</FormItem>
									</Col>
									<Col span="11">
										<FormItem label="安全管理部门：" prop="securityDept">
											<router-link v-if="securityDept.allPath!=undefined" target="_blank" :to="{path:'/imgDetails',query:{id:securityDept.id}}">
												<img :src="securityDept.allPath" alt="" style="width: 50px;height: 50px;">
											</router-link>
										</FormItem>
									</Col>
								</Row>
								<Row type="flex" justify="space-around" class="code-row-bg">
									<Col span="11">
										<FormItem label="安全总监：" prop="securityDirectName">
											<router-link v-if="securityDirect.allPath!=undefined" target="_blank" :to="{path:'/imgDetails',query:{id:securityDirect.id}}">
												<img :src="securityDirect.allPath" alt="" style="width: 50px;height: 50px;">
											</router-link>
										</FormItem>
									</Col>
									<Col span="11">
										<FormItem label="分管领导：" prop="chargeLeader">
											<router-link v-if="chargeLeader.allPath!=undefined" target="_blank" :to="{path:'/imgDetails',query:{id:chargeLeader.id}}">
												<img :src="chargeLeader.allPath" alt="" style="width: 50px;height: 50px;">
											</router-link>
										</FormItem>
									</Col>
								</Row>
								<Row type="flex" justify="space-around" class="code-row-bg">
									<Col span="11">
										<FormItem label="总经理：" prop="deptPrincipalName">
											<router-link v-if="deptPrincipal.allPath!=undefined" target="_blank" :to="{path:'/imgDetails',query:{id:deptPrincipal.id}}">
												<img :src="deptPrincipal.allPath" alt="" style="width: 50px;height: 50px;">
											</router-link>
										</FormItem>
									</Col>
									<Col span="11">
									</Col>
								</Row>
							</div>
                        </Form>
                    </div>
                </Card>
                <Card  shadow>
                    <p slot="title">作业过程</p>
                    <div>
                        <Form  ref="ptwSign"  :label-width="180" label-position="right">
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <Table ref='table' border  :columns="ptwSignColumn"  :data="ptwSignDatas"
                                        :span-method="handleSpan"  highlight-row stripe size="small">
                                        <template slot-scope="{ row,index }" slot="signerSign">
                                            <div style="display:flex;flex-direction:column;justify-content:center"  @click="currentGasDataIndex = index">
                                                <div style="display:flex;flex-direction:column;justify-content:center"  
                                                    v-if="ptwSignDatas[index].file != null && ptwSignDatas[index].file != undefined">
                                                    <router-link target="_blank" :to="{path:'/imgDetails',query:{id: ptwSignDatas[index].file.id}}">
                                                        <img :src="ptwSignDatas[index].file.allPath" alt="" style="width: 50px;height: 50px;">
                                                    </router-link>
                                                    <a @click="downloadFiles( ptwSignDatas[index].file)"><span
                                                        style="color: #3399ff;margin-left: 5px"> {{  ptwSignDatas[index].file.fileName }}</span>
                                                    </a>
                                                </div>
                                            </div>
                                        </template>
                                    </Table>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000005'"> <!--动火--> 
                    <p slot="title">气体浓度检测分析记录</p>
                    <div>
                        <Row type="flex" justify="space-around" class="code-row-bg">
                            <Col span="23">
                                <Table class="tableClass" highlight-row stripe border
                                        style="overflow-y:auto;"
                                        :height="200" :columns="donghuoGasColumn" :data="workGasDatas">
                                    <template slot-scope="{ row, index }" slot="checkResult">
                                        <RadioGroup v-model="workGasDatas[index].checkResult">
                                            <Radio disabled label="1">符合</Radio>
                                            <Radio disabled label="2">不符合</Radio>
                                        </RadioGroup>
                                    </template>
                                    <template slot-scope="{ row,index }" slot="checkUserSign">
                                        <div style="display:flex;flex-direction:column;justify-content:center"  @click="currentGasDataIndex = index">
                                            <div style="display:flex;flex-direction:column;justify-content:center"  
                                                v-if="workGasDatas[index].file != null && workGasDatas[index].file != undefined">
                                                <router-link target="_blank" :to="{path:'/imgDetails',query:{id: workGasDatas[index].file.id}}">
                                                    <img :src=" workGasDatas[index].file.allPath" alt="" style="width: 50px;height: 50px;">
                                                </router-link>
                                                <a @click="downloadFiles( workGasDatas[index].file)"><span
                                                    style="color: #3399ff;margin-left: 5px"> {{  workGasDatas[index].file.fileName }}</span>
                                                </a>
                                            </div>
                                        </div>
                                    </template>
                                </Table>
                            </Col>
                        </Row>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000007'"> <!--篦冷机清大块--> 
                    <p slot="title">气体浓度检测分析记录</p>
                    <div>
                        <Row type="flex" justify="space-around" class="code-row-bg">
                            <Col span="23">
                                <Button style="margin-top:20px" class="ivu-btn-add" icon="md-add" @click="addGas()">新增</Button>
                            </Col>
                        </Row>
                        <Row type="flex" justify="space-around" class="code-row-bg">
                            <Col span="23">
                                <Table class="tableClass" highlight-row stripe border
                                        style="overflow-y:auto;"
                                        :height="200" :columns="lengjiGasColumn" :data="workGasDatas">
                                    <template slot-scope="{ row, index }" slot="checkResult">
                                        <RadioGroup v-model="workGasDatas[index].checkResult">
                                            <Radio disbaled label="1">符合</Radio>
                                            <Radio disabled label="2">不符合</Radio>
                                        </RadioGroup>
                                    </template>
                                    <template slot-scope="{ row,index }" slot="checkUserSign">
                                        <div style="display:flex;flex-direction:column;justify-content:center"  @click="currentGasDataIndex = index">
                                            <div style="display:flex;flex-direction:column;justify-content:center"  
                                                v-if="workGasDatas[index].file != null && workGasDatas[index].file != undefined">
                                                <router-link target="_blank" :to="{path:'/imgDetails',query:{id: workGasDatas[index].file.id}}">
                                                    <img :src=" workGasDatas[index].file.allPath" alt="" style="width: 50px;height: 50px;">
                                                </router-link>
                                                <a @click="downloadFiles( workGasDatas[index].file)"><span
                                                    style="color: #3399ff;margin-left: 5px"> {{  workGasDatas[index].file.fileName }}</span>
                                                </a>
                                            </div>
                                        </div>
                                    </template>
                                </Table> 
                            </Col>
                        </Row>
                    </div>
                </Card>
                <Card  shadow v-if="modelData.modelType=='ptw-100001000000002' || modelData.modelType=='ptw-100001000000003'"> <!--有限空间--> 
                    <p slot="title">气体浓度检测分析记录</p>
                    <div>
                        <Row type="flex" justify="space-around" class="code-row-bg">
                            <Col span="23">
                                <Table class="tableClass" highlight-row stripe border
                                        style="overflow-y:auto;"
                                        :height="200" :columns="youxianGasColumn" :data="workGasDatas">
                                    <template slot-scope="{ row, index }" slot="checkResult">
                                        <RadioGroup v-model="workGasDatas[index].checkResult">
                                            <Radio disabled label="1">符合</Radio>
                                            <Radio disabled label="2">不符合</Radio>
                                        </RadioGroup>
                                    </template>
                                    <template slot-scope="{ row,index }" slot="checkUserSign">
                                        <div style="display:flex;flex-direction:column;justify-content:center"  @click="currentGasDataIndex = index">
                                            <div style="display:flex;flex-direction:column;justify-content:center"  
                                                v-if="workGasDatas[index].file != null && workGasDatas[index].file != undefined">
                                                <router-link target="_blank" :to="{path:'/imgDetails',query:{id: workGasDatas[index].file.id}}">
                                                    <img :src=" workGasDatas[index].file.allPath" alt="" style="width: 50px;height: 50px;">
                                                </router-link>
                                                <a @click="downloadFiles( workGasDatas[index].file)"><span
                                                    style="color: #3399ff;margin-left: 5px"> {{  workGasDatas[index].file.fileName }}</span>
                                                </a>
                                            </div>
                                        </div>
                                    </template>
                                </Table>
                            </Col>
                        </Row>
                    </div>
                </Card>
                <Card  v-if="modelData.modelType!=undefined&&modelData.modelType!=''" shadow>
                    <p slot="title">作业票关闭</p>
                    <div>
                        <Form  ref="ptwClose" :model="ptwClose" :label-width="180" label-position="right">
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <FormItem label="关闭原因：" prop="closeReason">
                                        <RadioGroup disabled v-model="ptwClose.closeReason">
                                            <Radio disabled v-for="(item,index) in closeReasons" :label="item.codingCodeId" :key="item.codingCodeId">{{item.codingName}}</Radio>
                                        </RadioGroup>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="23">
                                    <FormItem label="现场情况：" prop="siteSituation">
                                        <CheckboxGroup disabled v-model="ptwClose.siteSituation">
                                            <Checkbox disabled label="1">现场已清理</Checkbox>
                                            <Checkbox disabled label="2">人员已清点</Checkbox>
                                            <Checkbox disabled label="3">设施已恢复</Checkbox>
                                            <Checkbox disabled label="4">其他</Checkbox>
                                        </CheckboxGroup>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="11">
                                    <FormItem label="属地安全员：" prop="approverSign">
                                        <router-link v-if="ptwClose.approverSignPicture!=undefined" target="_blank" :to="{path:'/imgDetails',query:{id:ptwClose.approverSign}}">
                                            <img :src="ptwClose.approverSignPicture" alt="" style="width: 50px;height: 50px;">
                                        </router-link>
                                    </FormItem>
                                </Col>
                                <Col span="11">
                                    <FormItem label="时间：" prop="approverTime">
                                        {{ptwClose.approverTime==undefined?"":formatDate(new Date(ptwClose.approverTime),'yyyy-MM-dd hh:mm')}}
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row type="flex" justify="space-around" class="code-row-bg">
                                <Col span="11">
                                    <FormItem label="作业负责人：" prop="closeApplicantSign">
                                        <router-link v-if="ptwClose.closeApplicantSignPicture!=undefined" target="_blank" :to="{path:'/imgDetails',query:{id:ptwClose.closeApplicantSign}}">
                                            <img :src="ptwClose.closeApplicantSignPicture" alt="" style="width: 50px;height: 50px;">
                                        </router-link>
                                    </FormItem>
                                </Col>
                                <Col span="11">
                                    <FormItem label="时间：" prop="closeApplicantTime">
                                        {{ptwClose.closeApplicantTime==undefined?"":formatDate(new Date(ptwClose.closeApplicantTime),'yyyy-MM-dd hh:mm')}}
                                    </FormItem>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Card>
            </div>
    </Card>
</template>

<script>

    var cascaderDom = () => import('@/components/cascader-dom.vue');
	import {Api} from '../../../../api/index.js'
    import { sessionStorage, cookie } from '../../../../common/cacheUtils.js';
  
    export default {
        components:{
            cascaderDom
        },
        data(){
            return{
              imgs:[],
                belongOrgOfficer:{},
                belongOrgLeader:{},
                securityDirect:{},
                securityDept:{},
                bussinessDept:{},
                deptPrincipal:{},
                chargeLeader:{},
                signFileList:[],
                signPhotoFileList:[],
                loadingModel:true,
                conheight:{
                    height:''
                },
                tabHeight:{
                    height:''
                },
                tab2Height:{
                    display:'flex',
                    height:''
                },
                modelData:{},
                ptwTicketUserForSelectModal:false,
                ptwDatas:[],
                workGasDatas:[],
                ptwData:{},
                ptwClose:{},
                currentModelId:"",
                currentPlanId:"",
                currentPtwId:"",
                workGrades:[
                    {codingCodeId:"ptw-100003000000001",codingName:"一级"},
                    {codingCodeId:"ptw-100003000000002",codingName:"二级"},
                    {codingCodeId:"ptw-100003000000003",codingName:"三级"}
                ],
                highWorkGrades:[
                    {codingCodeId:"ptw-100003000000001",codingName:"特级：＞30米"},
                    {codingCodeId:"ptw-100003000000002",codingName:"三级：15-30米"},
                    {codingCodeId:"ptw-100003000000003",codingName:"二级：5-15米"},
                    {codingCodeId:"ptw-100003000000004",codingName:"一级：2—5米"}
                ],
                fireWorkGrades:[
                    {codingCodeId:"ptw-100003000000001",codingName:"特殊动火"},
                    {codingCodeId:"ptw-100003000000002",codingName:"一级动火"},
                    {codingCodeId:"ptw-100003000000003",codingName:"二级动火"}
                ],
                confinedSpaceWorkGrades:[
                    {codingCodeId:"ptw-100003000000001",codingName:"特级"},
                    {codingCodeId:"ptw-100003000000002",codingName:"一级"},
                    {codingCodeId:"ptw-100003000000003",codingName:"二级"}
                ],
                soilWorkGrades:[
                    {codingCodeId:"ptw-100003000000001",codingName:"主干道"},
                    {codingCodeId:"ptw-100003000000002",codingName:"次干道"},
                ],
                workTypes:[
                    {codingCodeId:"ptw-100002000000001",codingName:"运行"},
                    {codingCodeId:"ptw-100002000000002",codingName:"停机"},
                    {codingCodeId:"ptw-100002000000003",codingName:"检修"},
                    {codingCodeId:"ptw-100002000000004",codingName:"其他"}
                ],
                closeReasons:[
                    {codingCodeId:"1",codingName:"作业正常结束"},
                    {codingCodeId:"2",codingName:"因计划改变停止作业"},
                    {codingCodeId:"3",codingName:"因发生异常终止作业"},
                    {codingCodeId:"4",codingName:"其他"}
                ],
                workItems:[],
                detailRow1: 'detailRow1',
                detailRow2:'detailRow2',
                others:[],
                formData:{},
                currentabName:"name1",
                ptwModels:[],
                ptwModelSelectVisible:false,
                selectedPtwModels:[],
                currentPtwModels:[],
                ptwSignColumn:[
                    {
                        type: 'index',
                        title: '序号',
                        width: 40,
                        align: 'center',
                    },
                    {
                        minWidth: 100,
						title: '检查部门',
						key: 'signerRole',
						align: 'center'
					},
                    {
                        minWidth: 50,
						title: '检查时间',
						key: 'signTime',
                        align:'center',
                        render: (h, params) => {return h('div', [(this.formatDate(new Date(params.row.signTime), 'yyyy-MM-dd'))]);}
                    },
                    {
                        minWidth: 50,
						title: '检查情况',
						key: 'isFitName',
						align: 'center'
					},
                    {
                        minWidth: 50,
						title: '检查人',
						slot: 'signerSign',
						align: 'center'
					}
                ],
                ptwSignDatas:[],
                beforeGasDatas:[], 
                relatedPartyDatas:[],
                relatedPartyColumn:[
                    {
                        type: 'index',
                        width: 80,
                        align: 'center',
                        title: '序号',
                    },
                    {
                        title: '相关方',
                        minWidth: 120,
                        align: 'center',
                        key: 'relatedPartyName'
                    },
                    {
                        title: '联系人',
                        minWidth: 100,
                        align: 'center',
                        key: 'contactPerson'
                    },
                    {
                        title: '联系电话',
                        minWidth: 120,
                        align: 'center',
                        key: 'contactPhone'
                    }
                ],
                ptwWorkerDatas:[],
                viewPtwWorkerColumn:[
                    {
                        type: 'index',
                        width: 80,
                        align: 'center',
                        title: '序号',
                    },
                    {
                        title: '作业人员',
                        minWidth: 120,
                        align: 'center',
                        key: 'userName',
                    },
                    {
                        title: '人员类型',
                        width: 100,
                        align: 'center',
                        key: 'userType',
                        render: (h, params) => {return h('div', params.row.userType == '1'?'高处作业':
                            params.row.userType == '2'?'焊工作业':
                                params.row.userType == '2'?'起重作业':
                                    params.row.userType == '2'?'电工作业':'')}
                    },
                    {
                        title: '证件号',
                        minWidth: 120,
                        align: 'center',
                        key: 'userNumber',
                    }
                ],
                youxianGasColumn:[
                    {
                        type: 'index',
                        minWidth: 70,
                        align: 'center',
                        title: '序号',
                    },
                    {
                        title: '检测时间',
                        minWidth: 170,
                        align: 'center',
                        key: 'checkTime',
                        render: (h, params) => {return h('div', [(this.formatDate(new Date(params.row.checkTime), 'yyyy-MM-dd'))]);}
                    },
                    {
                        title: '检测部位',
                        minWidth: 100,
                        align: 'center',
                        key: 'checkSite'
                    },
                    {
                        title: 'O2 19.5%-23.5%',
                        minWidth: 80,
                        align: 'center',
                        key: 'oxygenConcen'
                    },
                    {
                        title: 'CO 24ppm',
                        minWidth: 80,
                        align: 'center',
                        key: 'toxicGasConcen'
                    },
                    {
                        title: 'H2S 10mg/m3',
                        minWidth: 80,
                        align: 'center',
                        key: 'combGasConcen'
                    },
                    {
                        title: '检测结论',
                        minWidth: 80,
                        align: 'center',
                        slot: 'checkResult'
                    },
                    {
                        title: '检测人',
                        minWidth: 120,
                        align: 'center',
                        slot: 'checkUserSign'
                    },
                ],
                donghuoGasColumn:[
                    {
                        type: 'index',
                        minWidth: 70,
                        align: 'center',
                        title: '序号',
                    },
                    {
                        title: '检测时间',
                        minWidth: 170,
                        align: 'center',
                        key: 'checkTime',
                        render: (h, params) => {return h('div', [(this.formatDate(new Date(params.row.checkTime), 'yyyy-MM-dd'))]);}
                    },
                    {
                        title: '检测部位',
                        minWidth: 100,
                        align: 'center',
                        key: 'checkSite'
                    },
                    {
                        title: 'O2 19.5%-23.5%',
                        minWidth: 80,
                        align: 'center',
                        key: 'oxygenConcen'
                    },
                    {
                        title: 'CO 24ppm',
                        minWidth: 80,
                        align: 'center',
                        key: 'toxicGasConcen'
                    },
                    {
                        title: '可燃气体（V%LEL） 20%-50%',
                        minWidth: 80,
                        align: 'center',
                        key: 'combGasConcen'
                    },
                    {
                        title: '检测结论',
                        minWidth: 80,
                        align: 'center',
                        slot: 'checkResult'
                    },
                    {
                        title: '检测人',
                        minWidth: 120,
                        align: 'center',
                        slot: 'checkUserSign'
                    }
                ],
                lengjiGasColumn:[
                    {
                        type: 'index',
                        minWidth: 70,
                        align: 'center',
                        title: '序号',
                    },
                    {
                        title: '检测时间',
                        minWidth: 170,
                        align: 'center',
                        key: 'checkTime',
                         render: (h, params) => {return h('div', [(this.formatDate(new Date(params.row.checkTime), 'yyyy-MM-dd'))]);}
                    },
                    {
                        title: '检测部位',
                        minWidth: 100,
                        align: 'center',
                        key: 'checkSite'
                    },
                    {
                        title: 'O2 19.5%-23.5%',
                        minWidth: 80,
                        align: 'center',
                        key: 'oxygenConcen'
                    },
                    {
                        title: 'CO 24ppm',
                        minWidth: 80,
                        align: 'center',
                        key: 'toxicGasConcen'
                    },
                    {
                        title: '45°C',
                        minWidth: 80,
                        align: 'center',
                        key: 'temperature'
                    },
                    {
                        title: '检测结论',
                        minWidth: 80,
                        align: 'center',
                        slot: 'checkResult'
                    },
                    {
                        title: '检测人',
                        minWidth: 120,
                        align: 'center',
                        slot: 'checkUserSign'
                    }
                ],
                ptwRuleCustom:{
                    adminDept: [
                        { required: true, message: '  ', trigger: 'blur' }
                    ],
                    adminDeptExpediter: [
                        { required: true, message: '  ', trigger: 'blur' }
                    ],
                    workDept:[
                        { required: true, message: '  ', trigger: 'blur' }
                    ],
                    colonyDept: [
                        { required: true, message: '  ', trigger: 'blur' }
                    ],
                    workType: [
                        { required: true, message: '  ', trigger: 'blur' }
                    ],
                    workGrade: [
                        { required: true, message: '  ', trigger: 'blur' }
                    ],
                    applyWStartDate: [
                        { required: true, message: '  ', trigger: 'blur' }
                    ],
                    belongOrgOfficerName:[
                        { required: true, message: '  ', trigger: 'blur' }
                    ]
                },
                ruleCustom:{
                    planName: [
                        { required: true, message: '  ', trigger: 'blur' }
                    ],
                    belongOrgId:[
                        { validator: (rule, value, callback) => {
                            if (this.formData.belongOrgId == null || this.formData.belongOrgId == '' || this.formData.belongOrgId == undefined) {
                                callback(' ')
                            } else {
                                callback()
                            }
                        },
                        required: true, message: '  ', trigger: 'blur' }
                    ],
                    operateOrgId:[{ 
                        validator: (rule, value, callback) => {
                            if (this.formData.operateOrgId == null || this.formData.operateOrgId == '' || this.formData.operateOrgId == undefined) {
                                callback(' ')
                            } else {
                                callback()
                            }
                        },
                        required: true, message: '  ', trigger: 'blur' }
                    ],
                    workDate:[{ 
                        validator: (rule, value, callback) => {
                            if (value == null || value == '' || value == undefined) {
                            callback(' ')
                            } else {
                            callback()
                            }
                        },required: true, message: '  ', trigger: 'blur' }
                    ]
                },
				twoLevelOrgId:''
            }
        },
        mounted(){
            this.conheight.height=window.innerHeight-120+'px';
            this.tabHeight.height=window.innerHeight-236+'px';
            this.tab2Height.height=window.innerHeight-236+'px';
            var ptwId = this.$route.params.data.ptwId;
            var modelId = this.$route.params.data.modelId;
			this.twoLevelOrgId = this.$route.params.data.twoLevelOrgId
            this.currentModelId = this.$route.params.data.modelId;
            //this.queryPtwSignPicture(ptwId);
            this.ptwData = {};
            this.others = [];
            this.currentModelId = modelId;
            this.currentPtwId = ptwId;
            this.$http.get(Api.getPtwModelByModelId+"/"+this.currentModelId).then((res) => {
                this.modelData = res.data;
            }).catch(e => {
                this.$Message.error("数据获取失败")
            });
            this.viewByPtwId(this.currentPtwId,this.currentModelId)
        },
        methods: {
            tabClick(name){
                this.currentabName = name;
            },
            setBelongOrgId(data) {
                this.formData.belongOrgId = data[data.length - 1];
            },
            setBelongOrgName(data) {
                this.formData.belongOrgName = data;
            },
            setOperateOrgId(data) {
                this.formData.operateOrgId = data[data.length - 1];
            },
            setOperateOrgName(data) {
                this.formData.operateOrgName = data;
            },
            selectModel(){
                this.selectedPtwModels = [];
                this.ptwModelSelectVisible = true;
            },
            closeModel() {
                this.ptwTicketUserForSelectModal = false;
            },
            queryPtwModel(){
                let data = {
                    belongOrgId: sessionStorage('userId').getObject('userId').orgInfo.orgId,
                    userId:  sessionStorage('userId').getObject('userId').userId
                }
                this.$http.get(Api.queryPtwModelList, {params: data}).then((res) => {
                    this.ptwModels = [];
                    res.data.forEach(item=>{
                        this.ptwModels.push(item);
                    })
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })
            },
            queryPtwTicketByPlanId(planId){
                this.$http.get(Api.queryPtwModelListByPlanId + "/" + planId).then((res) => {
                    this.currentPtwModels = [];
                    this.currentPtwModels = res.data;
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })
            },
            queryPtwSignPicture(ptwId){
                this.$http.get(Api.uploadPTWFiles  + '/' + ptwId + '/files/picture?field=chargeLeader').then((imgRes) => {
                    if(imgRes.data.data.length>0)
                        this.chargeLeader = imgRes.data.data[0];
                })
                this.$http.get(Api.uploadPTWFiles  + '/' + ptwId + '/files/picture?field=securityDirect').then((imgRes) => {
                    if(imgRes.data.data.length>0)
                        this.securityDirect = imgRes.data.data[0];
                })
                this.$http.get(Api.uploadPTWFiles  + '/' + ptwId + '/files/picture?field=securityDept').then((imgRes) => {
                    if(imgRes.data.data.length>0)
                        this.securityDept = imgRes.data.data[0];
                })
                this.$http.get(Api.uploadPTWFiles  + '/' + ptwId + '/files/picture?field=bussinessDept').then((imgRes) => {
                    if(imgRes.data.data.length>0)
                        this.bussinessDept = imgRes.data.data[0];
                })
                this.$http.get(Api.uploadPTWFiles  + '/' + ptwId + '/files/picture?field=belongOrgOfficer').then((imgRes) => {
                    if(imgRes.data.data.length>0)
                        this.belongOrgOfficer = imgRes.data.data[0];
                })
                this.$http.get(Api.uploadPTWFiles  + '/' + ptwId + '/files/picture?field=belongOrgLeader').then((imgRes) => {
                    if(imgRes.data.data.length>0)
                        this.belongOrgLeader = imgRes.data.data[0];
                }) 
                this.$http.get(Api.uploadPTWFiles  + '/' + ptwId + '/files/picture?field=deptPrincipal').then((imgRes) => {
                    if(imgRes.data.data.length>0)
                        this.deptPrincipal = imgRes.data.data[0];
                })
            },
            handleSpan({row,column,rowIndex,columnIndex}){
                if(columnIndex == 1){
                    return {
                        rowspan: row.mergeCol === 0 ? 0:row.mergeCol,
                        colspan: row.mergeCol === 0 ? 0:1
                    };
                }
            },
            cancelPtwModels(){
                this.ptwModelSelectVisible = false;
            },
            deleteModel(ptwId){
                this.$http.get(Api.deletePTW+"?ptwId="+ptwId).then((res) => {
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                });
            },
            viewByPtwId(ptwId,modelId){
                this.imgs = [];
                this.ptwData = {};
                this.signFileList = [];
                this.signPhotoFileList = [];
                this.ptwClose={};
                this.ptwSignDatas = {};
                this.workGasDatas = [];
                this.beforeGasDatas = [];
                let url = Api.queryPTWDetail;
                this.$http.get(Api.getPtwProcessByPtwId + '/' + ptwId, {params: {}}).then((res) => {
                    if(res.data.ptwClose.closeId != null)
                        this.ptwClose = res.data.ptwClose;
                    else
                        this.ptwClose = {};
                    this.ptwSignDatas = res.data.ptwSign;
                    this.workGasDatas = res.data.workGas;
                    var index = 0;
                    this.workGasDatas.forEach(item=>{
                        this.getFileInfoById(index,item.checkUserSign,3);
                        index++;
                    })
                    index = 0;
                    this.ptwSignDatas.forEach(item=>{
                        this.getFileInfoById(index,item.signerSign,2);
                        index++;
                    });
                    if(this.ptwClose.approverSign != undefined){
                        this.$http.get(Api.getPTWSchemeFile  + '/' + this.ptwClose.approverSign).then((res) => {
                            this.$set(this.ptwClose,'approverSignPicture', Api.viewPicture + res.data.filePath);
                        });
                    }
                    if(this.ptwClose.closeApplicantSign != undefined){
                        this.$http.get(Api.getPTWSchemeFile  + '/' + this.ptwClose.closeApplicantSign).then((res) => {
                            this.$set(this.ptwClose,'closeApplicantSignPicture',Api.viewPicture + res.data.filePath);
                        });
                    }
                })
                this.$http.get(Api.queryPTWDetail + '/' + ptwId, {params: {}}).then((res) => {
                    this.beforeGasDatas = res.data.beforeGasDatas;
                    this.relatedPartyDatas = res.data.relatedParties;
                    this.ptwWorkerDatas = res.data.ptwWorkers;
                    var index = 0;
                    this.beforeGasDatas.forEach(item=>{
                        this.getFileInfoById(index,item.checkUserSign,1);
                        index++;
                    })
                    this.ptwData = res.data.ptwData;
                  //  this.getSignPicture('confirm');
                    this.workItems = res.data.itemData;
                    this.workItems.map(subitem =>{
                        let childs = subitem.itemList;
                        let rowNum = childs.length / 4;
                        subitem.rows = [];
                        for (let i=0; i < rowNum; i++) {
                            subitem.rows[i] = [];
                            for(let j = 0; j < subitem.itemList.length - i * 4; j ++){
                                let flag = (j + 1) % 4;
                                let index = i * 4 + j;
                                subitem.itemList[index].fileUrl =  Api.uploadPTWFiles  + '/' + this.ptwData.ptwId + '/files/picture?field='+subitem.itemList[index].itemId;
                                subitem.itemList[index].fileList = [];
                                subitem.rows[i].push(subitem.itemList[index]);
                                if(flag == 0 ){
                                    break;
                                }
                            }
                        }
                        //如果最后一行不满4个，添加空数据补满
                        if(subitem.rows.length>0){
                            let diff = 4 - subitem.rows[subitem.rows.length-1].length;
                            for(let i = 0; i < diff;i++){
                                subitem.rows[subitem.rows.length-1].push({});
                            }
                        }
                    })
                    this.loadingModel = false;
                }).catch(e => {
                    console.log(e)
                    this.$Message.error("数据获取失败")
                })
                this.$http.get(Api.uploadPTWFiles  + '/' + ptwId + '/filePaths/picture').then((imgRes) => {
                  this.imgs = imgRes.data.data;
                  this.belongOrgLeader = {};
                  this.belongOrgOfficer = {};
                  this.bussinessDept = {};
                  this.deptPrincipal = {};
                  this.securityDept = {};
                  this.securityDirect = {};
                  this.chargeLeader = {};
                  this.imgs.forEach(item => {
                    item.allPath = Api.viewPicture + item.filePath;
                    if (item.field == "confirm") {
                      this.signFileList.push(item);
                    } else if (item.field == "confirmPhoto") {
                      this.signPhotoFileList.push(item);
                    }else if (item.field == "belongOrgLeader") {
                      this.belongOrgLeader = item;
                    }else if (item.field == "belongOrgOfficer") {
                      this.belongOrgOfficer = item;
                    }else if (item.field == "bussinessDept") {
                      this.bussinessDept = item;
                    }else if (item.field == "deptPrincipal") {
                      this.deptPrincipal = item;
                    }else if (item.field == "securityDept") {
                      this.securityDept = item;
                    }else if (item.field == "securityDirect") {
                      this.securityDirect = item;
                    }else if (item.field == "chargeLeader") {
                      this.chargeLeader = item;
                    }
                  })
                })
            },
            getSignPicture(field){
                this.$http.get(Api.uploadPTWFiles  + '/' + this.ptwData.ptwId + '/filePaths/picture?field=' + field).then((imgRes) => {
                  imgRes.data.data.forEach(item => {
                    item.allPath = Api.viewPicture + item.filePath;
                  })
                    this.signFileList = imgRes.data.data;
                })  
                this.$http.get(Api.uploadPTWFiles  + '/' + this.ptwData.ptwId + '/filePaths/picture?field=confirmPhoto').then((imgRes) => {
                  imgRes.data.data.forEach(item => {
                    item.allPath = Api.viewPicture + item.filePath;
                  })
                  this.signPhotoFileList = imgRes.data.data;
                })  
            },
            getFileInfoById(index,id,type){
                if(id != null){
                    this.$http.get(Api.getMongoFileNoBase64Info  + '/' + id).then((imgRes) => {
                        if(type == 1){
                          imgRes.data.allPath = Api.viewPicture + imgRes.data.filePath;
                          this.$set(this.beforeGasDatas[index],'file',imgRes.data);
                        }else if(type == 3){
                          imgRes.data.allPath = Api.viewPicture + imgRes.data.filePath;
                          this.$set(this.workGasDatas[index],'file',imgRes.data);
                        }else {
                          imgRes.data.allPath = Api.viewPicture + imgRes.data.filePath;
                            this.$set(this.ptwSignDatas[index],'file',imgRes.data);
                        }
                    }) 
                }
            },
            formatDate(date, fmt) {
                if (typeof date == 'string') {
                    return date;
                }
                if (!fmt) fmt = "yyyy-MM-dd hh:mm:ss";
                if (!date || date == null) return null;
                let o = {
                    'M+': date.getMonth() + 1, // 月份
                    'd+': date.getDate(), // 日
                    'h+': date.getHours(), // 小时
                    'm+': date.getMinutes(), // 分
                    's+': date.getSeconds(), // 秒
                    'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
                    'S': date.getMilliseconds() // 毫秒
                }
                if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
                for (let k in o) {
                    if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
                }
                return fmt
            },
        }
    }
</script>
<style lang='css' scoped>
    @import '../../../../index.css';

    
    .model-list-css{
        width:200px;
        height:100%;
        font-size:16px;
        display:flex;
        flex-direction:column;
    }

    .model-list-css >>>.ivu-card-body {
        padding:0;
    }

    .modelSub{
        margin-top:10px;
    }

    .detailRow1{
        border: 1px solid #E0E0EC;
        font-size:12px;
        font-family:Microsoft YaHei;
        font-weight:400;
        color:rgba(51,51,51,1);
        line-height:2;
    }

    .detailRow2{
        background:rgba(248,248,249,1);
        border-right: 1px solid #E0E0EC;
        border-left: 1px solid #E0E0EC;
        font-size:12px;
        font-family:Microsoft YaHei;
        font-weight:400;
        color:rgba(51,51,51,1);
        line-height:2;
    }

    .PtwModelListClass{
    }

    .PtwModelListClass .wenben:hover{
        cursor:pointer
    }

    .PtwModelListClass .ivu-checkbox-disabled+span{
        color:black;
    }

    .PtwModelListClass  .ivu-radio-disabled:hover .ivu-radio-inner {
        color:black;
    }

    .PtwModelListClass .ivu-radio-disabled:hover .ivu-radio-inner{
        border: 1px solid black;
    }

    .PtwModelListClass .ivu-checkbox-disabled:hover .ivu-checkbox-inner{
        border-color:black;
    }

    .PtwModelListClass  >>> .ivu-radio-disabled .ivu-radio-inner:after {
        background-color: black;
    }

    .PtwModelListClass  >>> .ivu-checkbox-disabled.ivu-checkbox-checked .ivu-checkbox-inner:after {
        animation-name: none;
        border-color: black;
    }
</style>
